package com.yiqi.liebang.feature.mine.view.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.suozhang.framework.framework.AM;
import com.yiqi.liebang.R;
import com.yiqi.liebang.entity.bo.UserCenterBo;

public class WorkListAdapter extends BaseQuickAdapter<UserCenterBo.OccupationAuthenticationBean, BaseViewHolder> {
    boolean isShow;

    public WorkListAdapter(boolean isShow) {
        super(R.layout.item_userinfo_work_list);
        this.isShow = isShow;
    }

    @Override
    protected void convert(BaseViewHolder helper, UserCenterBo.OccupationAuthenticationBean item) {
        helper.setVisible(R.id.btn_userinfo_work_edit, false)
                .setVisible(R.id.btn_userinfo_work_renzheng, false)
                .addOnClickListener(R.id.btn_userinfo_work_edit)
                .addOnClickListener(R.id.btn_userinfo_work_renzheng)
                .setText(R.id.tv_work_company_name, item.getCompany())
                .setVisible(R.id.iv_user_position,item.getStatus()==1?true:false)
                .setText(R.id.tv_work_company_position, item.getBeginTime()+" - "+item.getEndTime()+" , "+item.getPosition())
                .setText(R.id.tv_work_company_info, item.getDescribeInfo())
        ;
        AM.image().bindToCircleObject(item.getComLogo(),helper.getView(R.id.iv_work_logo));
    }
}
